/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>
#include <iostream>

#include "hks_ability.h"
#include "hks_config.h"
#include "hks_crypto_hal.h"
#include "hks_crypto_hal_common.h"
#include "hks_mem.h"

using namespace testing::ext;
namespace OHOS {
namespace Security {
namespace Huks {
namespace UnitTest {
namespace {
struct TestCaseParams {
    HksUsageSpec usageSpec = {0};
    std::string keyData;
    std::string hexData;
    HksStageType runStage = HksStageType::HKS_STAGE_THREE;
    HksKeySize keySize = HksKeySize::HKS_RSA_KEY_SIZE_512;

    HksErrorCode encryptResult = HksErrorCode::HKS_SUCCESS;
    HksErrorCode encryptInitResult = HksErrorCode::HKS_SUCCESS;
    HksErrorCode encryptUpdateResult = HksErrorCode::HKS_SUCCESS;
    HksErrorCode encryptFinalResult = HksErrorCode::HKS_SUCCESS;
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_013_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "00112233445566778899aabbccdd",
    .keySize = HKS_RSA_KEY_SIZE_512,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_014_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000eadcc37762c4a0c4cd358de290f2efedf39503a1833e4082aef44cb564ff47d4feaee5"
        "f145b3711cd9abf944e0586bc083dd2c7dde4fc8f7d9a69d4fc5a8aef527c82d02fd30eb33a1791db30011733d60ef3110bd769f385f10"
        "b071ae552dbd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001158f2e62472ec593"
        "4b431f432d0b1ffb37e0f5f45d97d95425bb474f5f760fa1fdbf105c95896358c2a286bf4bd8d20b2d0b0880ff0193bcf0e625a9dbe330"
        "6ea4534c0d7e83b657684194501574a554f76cbe29ce5953e1d92b479b4d1f8201",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_768,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_015_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000d10cdba0a029d15254e1b98a1ab3fe28387017976d817ed229a88e521037451768a681"
        "bd6b8944d1efc6be41913da3dc8cf42cae0d0b449e2cec4df0537b1702cd9a79b8394175c0474e96fdc7d26616c268059c4d01bb6ffa70"
        "c12fa591e40093d988fe0c1d76df2d5999827cb12e7b287d537d477a7a8dae6ce9e6a1c2577d0000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "010b443221f9ffc6f434f6e554f81373431fa78addf25ce444d751ea39a9fe108f2e68aadd568a53572d20fce7f3b7eab8dc2fdca894b3"
        "62c3539078b2d70cef3472861416697b8908bd3c7263a6873b3baada43817202bb5b90e417af0e3ba8c1fefa011592604c2c9066e12265"
        "5b83ef84097f2112e64d11193da5dfcfbf9a51",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_1024,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_016_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000c594f464bc7852f61e96a56ffab6d1ee5cc5552e51ce5426b17b8fb50cefadecb0ef2e"
        "9402906b9460f2dc527188a346e964acdc3357c2dcc56be8247243350cd9dc122dac3f37f4d22870e9b6d5524d43fadf5cb3a5386ebc11"
        "4fc830faa624155526fc893bf7848451827c68c3610932a7a97a55c371340b86b4ba1aeacdc0185a7ac78511947bec87bbbfe011baa45b"
        "19d7f7eb0accc77502f26ebb0d4797b3cf1a32116f9cd9f0ad4977d2881cb61d0439099c77e3e59aeb4386ca545cf534453c55d7b548e3"
        "de6cc513374cbe312eb6564d476859307dd47498df59dfeaade0a8339754fb3a192cd64bad563c861b505d05b54a6254903ebfdfc6beb7"
        "79000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000010001691598061bd7430873ac5bc0faef51281d5f"
        "36b6b3fbb0f6035f5c4746e212f6d803de1a0a6315548d5b9da29b8fb887768a7d0580a9249296cd95620d0381ab9c1357f7c2acbcee10"
        "f841558c5058bd8f725669cf8208499cecf829d922f64a2aae6755d90773d59f2a5ae4203409e00278f9c27eeabbc29a7ec29058d0992c"
        "a911b57a2af8a582caaa3add2aec200127e95e9032a8a4c546fab425148dc2c72ff487ad05bf0dcd278024e74d0e010f5aab57eaa5dc8d"
        "ffc4e049cc6e2b34d50db7e73f0f4c78e887a0b59f2ce34117ed605379c0b28a096c2c38282af0048df55dbf771cc57e327e8008e86723"
        "adf95c1f761b56c8ddf2e78e532861cef681",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_017_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c0000800100008001000080010000c50e4fe8739a73a3627e504ffd323bb95057417d2b23fac0939c6e3c43c19450b38733"
        "19275612866f0e8d349585c17bffa9c13389975916f2235161fca6a655b4c0a3c833789a18a9add01f837da762b5acdf29f296324b4d5f"
        "7f586f900566d949f4784b935503b4105e2c6e83d43d6d17e07545eac427be17f0fd7b08fab210f38bfb405ca524877d5c039505a0a9d7"
        "c2e24e9367a8a13e2fb9e3e1dd7b72936737b0590ce3cc9262284ed041c2b362ed3b617bf879256e69be4357c027dc66d5afc0a4d35a2d"
        "cc6b42344bf55b90985aea8d2604af1ad404fa8dd9014c21da00a2587c82f97045b8be3593a41d71307f5b3295964257ab8d7ab8521b47"
        "29dba792af69655296577ca175d974e64ed33881c905649b8a6bbb13ac1cb1cafc6ad61af81d3a0813eb1107d0d953607a1e99657de527"
        "c108ce22c06f8585751f071efd87e7e874e01c17714ce73c2b619594119030f54f9c88158b8d64ffdbde582c3340898c18762458bec67b"
        "a306aca31268accd72a4382c6e06b35a01f673000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000100012ce1e0a3724938937b288804600824004663496048062ee3d3fb2a4481ae42a8caeb3d613a"
        "4b6976c32ece4caecdc34f09e15146faccc516ebd9cd7c82fe361e8947e346032b31f5f217cbb291d179e18abdb02aaebd35015fc3238f"
        "3201dca91b4eb3e6fe57b5625d8de8d537eac0d9a8d26a666ba158423112e4e9e72f19629b67cd7751a6885ab49d81eab2f3902f7f1c3d"
        "4d665792d9feff01d8fca5e4ab2915b6626d35f960abeabd818dff9c681d5d294c3fdf4d409050776c813d1c16b9ae28a78057a4a47e77"
        "c62071a0da7d8cef186a98f2c95b16394689534726d18fa8b0526c40d64bb13f579532fc56e9ff2fdf95f0df3ab8493264ed098cb57e8c"
        "fe9cbce24a5bdbea355ede53246798c79599d7aee1ac380ed8ee77f08276c617fee8a8989c116407e8d7a481ff77ef32f7405b5736b36a"
        "593925cf15c3da1965f84eb4153a7d557a790a869fb99290dca0b4d6a97bc0ed32fa41eba3a27b9379e3f2b140e7d1e0a315af6561c5ff"
        "1c894ad34cb998b6eeaeec5d3785bddfc1",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_018_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA1,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000b3166774620460ff0b4fd912c441a184527d8b6bcf1d4fe22791bd0a79b9cdb4afc944"
        "532e948aa190ec27869df84384f0921abf036181369db2ec71011f3f2ea1b1a0f8521cdb75a47e1051e68d3220248b9e68303780247fba"
        "99610d7309a99087c6da95a0f3bd5abdf703693bc7285a0a30944e132015370f9d263f44b8b2d05ed32470096eb6c7309e6c62d74cf99e"
        "72ee94e8e1bbbcc902935762c6a5e3297e4766fc49867e7768f40902d87a219d92c196caa030a206ab75c02a4fbc4d0803d082fd328613"
        "9315489f52b591caff2827d70d8839f47fb4195dc6036f3718987b56e6c772a30694cf983671ad6b93e1ec99ff94125a6268b1e556671d"
        "11d41eeaec4c5e642534243dc5f4edd64190dcab9497298d8101ed7c3a97b4f28c892cdb2e3adc67bca83862429d82e8f6c40b72d7dc39"
        "1b214c09da284a7aeed2a21914dd0aa3ffa0c97800b8c37198e92a5ed1c12788c9313d3bddf5436cf17c1e481e7613fe8a04cb8e5c14f9"
        "8c450f4df4a3f77e548615adc6face54baf5f60a140759ad341aafe0187d9f05745f094b547dc4bb3ad5b2be64dc10e000e555c7a09282"
        "e7ceeb8d99e1fbc64e57409f644fe5e877735695222347ce556fa340188ed74df9ebb26f7205206a94b9eba96da988e13ad273b931a9f7"
        "6e501f371e789cb2a1249056076e50091949bb9ace7af104cd9db3e03d832a4c3e6fdb9c87000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000170"
        "d46ab5ae9367b1082574741865e926fef9cdff4c6c014a50f7c70c7488958b833ce0e92f6db2b1fc266cf8a94a22effcc970446c12e05f"
        "d29749d4208ad939bdf1b5a2fdc8e49387e14cd2ecd8847e2fc82f33213db664487cfde96199daba942e97205c291da76d26461c460ebd"
        "7934d13aae154a836a1a58a1ffd8d8a92d2f8eaea4445a0d00e71a4095b4e844bcf8111d33804dc80436f8827009f171ce5ef40a745dfa"
        "ccdb9ccbe9044c60ab01c6cf115cb9a8973b5dcc64d17f56e121ff2cb80fef0a07e30945dd8d5384c5a8097df92bca80cb52b9aa7458da"
        "4a8ba540bfc0e58d5c976312e06ab2518ae961dfb7f56348dcb77b6e88db9bcc06070f871c5f38d10e16c686e51a78a7d54a78e7ba0d5f"
        "a5c42c4a401529890f5f697ae567a0e5583f49e73f2ee735dba5d0b15df3f0195a48de70120eead966126f161bb57d770cff988500ed1e"
        "49739298692a55764756eb3930ddcd035f36f121b242d21bb4088bf176a3a98045e25ef9347d2a2438fedb024765d80b7a6b4d5b0edff1"
        "dc96854afae97c3b6bb40793f78e93972a8080b87934ef9e014087ad5c794dfd6313cef45d72d9be592846a5c4414b2570de994b467db7"
        "8f068d0886fc1d67a36f80f556b5913a55da31fc193718e74dc3275c224875eecad8a353183244c4c73c2bb6b96a5ce84c5c8992b43eb7"
        "2ed71af821a658f473f0a3a283f40d41",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_019_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_512,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_020_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000ac66380f18d9dab2188de40e6bb622e2da123e08add16b7c5dc260dfbfe7432c390698"
        "e3bf34e7e237c0777e4bb10a29ad8ce41172cad65dfcadf25c8dbf9b0e9fcd62d5a4b7967199151aaf97df9eaffd0a2f96cf324c2a6001"
        "7f5f29d59dc100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100017ac81636d2591dc3"
        "676f6eb3c28ca64df047bbbc8ca6b0a99351039377662a560d8b204a5b7c3f85c27525e561dd05c1bbdb5bc9bddede40e55397fc15034d"
        "d30c4309779e0437e0c14191e04829be3d20448bcdc236eabd23ee05a8d76c0001",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_768,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_021_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000cd1a15f15683bc8bb38041d407aa1499bffa2831f94f61ba607a37da356a664e0af5ea"
        "01a43052b1b93221208764c02df86d69ee2475192b0bee0dd08246a3a927df959e3e2ca68558e3e8f82c1fbc231524f3d78bd2ad1141db"
        "4dbf5800a031f254a9f5eca58169bb3daa787707863d0f42a0a868c1cf882c995965cb4317dd0000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "014145f0ffca71c87a8958e31a508a1f5e430ba0e92e97c5d963c4e1ab8f5e5a4ab2104b35d484107d411c2410cf261047510db92db1ea"
        "9664edba0829789c748ed96740a56894f7f085ce43761b81e00738337061bb7f7fd27318c558f4deff8160c071c7c91c47a3e01950198c"
        "ff3985125a1ae69abddb80834bafc33944edc1",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_1024,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_022_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000d44c2eba9c805a2e00397ba68b54ded3d626b02b93d72664f97e023ecf5d4974388aac"
        "ab0983529acc1302beef7975cf9db43a4a422b258bc3db75fdba50fd67bd009a44a248b712638589c6d5115aeb8b320c04401400c3a0d8"
        "6684337937ff2259330c06dfbd652497fbdf5722dcc8a4d583f59ad1a02eca4a964516a23a06c4398d4edd2c977e7b85d41f303f62bfb9"
        "3ff65e9e837e8d3c6f1c9c9d067a0df7c36a0c196349d2cfc1d82c5daa60935171e42754447ce60328abbcbba6078c39ccda078cf88adc"
        "1dbfbc645a401fe386b57b5edc94d5bc8fc7e2c3cac6608fe8d91e69ea9fb17f6b7b42ae794fbe82e12cfa4ce60a11de5e83c315b902d5"
        "c9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000100014aba8a545bd47e69e4e0571b37be67355013"
        "8c3dbaaba83330f35f1cf6e7527cdb8e4cdb63dcdb0dec39e0e48eed454010b629328c7a1d9c461411437ffb144818ea86631470de2855"
        "e9e2a69fc79d267e77de6cfc954df38ec1bdcc59461924f0d54f37b38fbc5e46f44ccfc01f60722c3b9058bae7812817430c0443c45501"
        "fa69778115a748a79b89d1e99c7791516a2f7d19114cbbd4ed7827b51ff8caee4dee84f16ed0a1b497513be6d563fc5ee7d0891c523e8c"
        "0c0be002f7edc638607ba45647166342b004d1cc7a31a3492d8980b9a3f2151a4aa2cd8bdac7b1652d791e6915730bc9de98ac1a3b5fd8"
        "2c26ae2da515146886c78090a7aa8c31ecf5",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_023_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c0000800100008001000080010000dc3d6c0fb6da1679390202196baa6a999f217a7ed8ba8a3d309bcdff755094dd09bc41"
        "77ea6ed014ee412051b2c02f851f32e4400c894ec6da6b510d613536c32f2dbce41d4b9196c24ade4edbde812e8eb2a774bad179c7bc4b"
        "aa338fa2cd67d5e6b868b042b7fc0120fcf2e8e104a3dbc35c250fc91e486565e8928d5d047d0bae93ff09d9351157e5a000073935b09f"
        "4bc7e5b25e2287f44ac8daed8e0e5db021359ec22acd2a1d374d82d7ddfbedd7ffe6a09e52fe8d23a751665fd8b36a456fea4d69900a7a"
        "623d92c6a28e56d80561e3123a99c49253058177cff12a06c8e4d77563f0367f5ebaa8f5d71750c721fb6a6dee9d28a97c7474692f60f5"
        "528f3a1e02234c93fd895e62f40a9c44ed62cf37c52e1c4f582350c6ca7991a6468cf4dd75b556cffb09c6b69c4719d00196f4bbe1dce1"
        "204bbc5a673fc81fbac0a8e2fbfc7d4f87ef3e1a501da79226ff984e440731c7a2d8882aafe3d8195dfbcd8c8665e9e1bb334fc9b64ec6"
        "b22f38015a9e797b3a509b8efb44541344a64f000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000100019570a40361aa47b7878422528768c21e6d08b56a9ebaac946a883dd60a0f5c834358d6ff7c"
        "3626c11d0d59d5b5b98c4502ef704b39766ddaa6584d4e0bd8a4c8fa1949e36b315c9f744482e5f570dc2cf02caf4d987a0ced078a3bf9"
        "f28ba05ec5986126bffaf5866c69aad9544562f5a067c5fd6be1a6c7aeede04a98db35f1775cc51537e4878ab61e9c5b888b3c301556c1"
        "53cd9cec475deee4ad10a5e47f93c464f2cd8367651d1fea5b4f08542a85f720d179bc8cf6cdeb796342c3f2b0756daf51eda214a3e49e"
        "23fa8682ca429d1f5bdb6488baa9595272ceb55517fda0eb723256c50fb151a175d73a117508213b7e6d3be0eac0f6c349b5af0d77f22a"
        "5bdc22cdab221cb8e474011122e67d195a00ce9dd821242df8eebde04770527d559370e93b7f8c7e882db778b6255d487d2119acfd81bd"
        "0363e27d27486d14df9407e8290916064230a638782b4a1b02582c1841703f88d0555357d9c0a2052d9d6bb7d7e5e1302c466eaa621e4b"
        "4c6b42f0a1bf2588695018a295ebd7f031",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_024_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA224,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000bd0d9010dd30b0ec8c396744527127508359e0f12aa4b8b09dc20f42040644d4b33f90"
        "de38ce815367af5a8cabf18a71732d569bcda767767ae0b61f38108a021d197b2e097e60cad6ff186a3510667a4e19eca53abca79dbc57"
        "8e0d30ba42146946c1f5fcd6204e17252be83121554ca68637e85e5534d1f2c943831d9a65de22c70812872ec219cd2ede8c8c3e78a5d5"
        "250b3edf4bb4bfd9a9232f2dd2902b61eca43038d354a365dcacc623de3b062207f7807c9d877a603e2c70ae129c5d418fe52f023025d2"
        "68b0627c0dbf1488fa078fb187b57c17c86a43116f94622c5ba31c4ca771428fb73c8b9ee7ff21962dad6b2094c83823f413bd8ec23648"
        "186c34a2ba9f0d972af78d7882bedd926faffc6944c4d4211888fa4a49ced7f558d30929041d93a8c5d2275e0330909cb201a618f5a747"
        "edc459189b7d30426c49a0d10646a10f015f1e418370874ec2ab0304515178c9fb4425b7c4747e6fef0981b8d599cd3c1152ed804a79b8"
        "9737a5344848a4b36ccc9a29b7fd58ec854a5457fb9b24f192959050ea793b8f17d27cb8cd809b9b87957889947576137868bb30bd4810"
        "c421b6e937fbb554f9345e266cab23623970f94df74a0a6321487fa655933f45a1fdff7252aad1230e518503ca22ff815d6427acdb57df"
        "b7480bd4fda526470c7a3187ea980db8b75b486d77844e030821b804f32b56b75994b96a11000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000116"
        "9c2ea4b5af83196753de33dfa044d16e442b90ec46b307fc761f19081e2fd13876dbbe9810aa8aed159dc0c137ac15116f54b2619029e1"
        "93a49863777312ee59c89860d325d831aa30ec1c97a814798029bd91ad4aaec940a3400bf7cdeee53e0a065c8316a0da760e2e08210819"
        "898748fa1ac25d7269c19dac835be10159e5d2e3f64350a64a2badf553ddda02d7e27c01b24d4662a1a748813abd423797d8a852a2a9c9"
        "2c90363884395644d7ce4df7a1f42df33126c3a7ebecb604e7ca8772cc38290cd5192b081d5f34cdab890e4e25335845ae47b1e2738efc"
        "4744ce854f26ad4c4151729ab995013641df2474e60eafe0db694b737f80e637f801fb25223a924e96341ecd43fde54a977bd668c5a9a3"
        "95dfe66562891c211e888e68ec740f05e5cbf3776774689b83453463a226d4dfa263dafee68378af41c5391bea2588f356799578bc5b67"
        "e6382f5739a428589429c9fa66bc8a418ed6a353a09f92efecc9029f51eedf9f98134310cc11ec064fb6e5c9266b0aa88d42e8e574f3fd"
        "2f3da8e34a310324b42bec03945c67b54915f82eab1936972a2ae42ac1d71f3c552b39a3a62e25b7b38dcab1c4b71b89445dc563a158b8"
        "614a5d4c4792e3e9c1e4aad4a854930f63a476441d90422e1a671b0fbbeda2015b189756e421c8e7a6253e354c7e116ed50cb410bdedf5"
        "5689eeac4e8eb71c16fc15829b821b21",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_025_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "00112233",
    .keySize = HKS_RSA_KEY_SIZE_512,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_026_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000abb40b8b0a75bde0d4b54aac6d680c7017c5988f76796cfd1bab57d3742fae7a0df13a"
        "c51b64ebee13da5bf8a59dd5890671f2078778a6e8e2f78683ebd9a36be36270d5bd2e94d9fd16c7eef047dabe81addde56a8c07c057b1"
        "87c5f727432900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000148d0ed08452253a9"
        "126be3c4260db7209e6434e3ba599a67e8a10c78e750054d4bb65eb7127c05360d035077ad3cb73e5805aebfd28f2189acfa371768cd18"
        "c301fc00f0981e1c14d377736068e93e8367c4f7bb0fa5a1aa3e827b2bfc52d595",
    .hexData = "00112233445566778899aabbccdd",
    .keySize = HKS_RSA_KEY_SIZE_768,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_027_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000abd5067aca33441d55adb08616728eb4fc6fd2a2305b65d844e649524e33f85f7f8443"
        "62305460648dd18113b4ef745d8f84a1317b7f0bf2fcedf3a98a163663c37cf3d1735c5949cbaa8109e1f414633979e5921b54e92d9aba"
        "955d4611939be832605d80c21e7d1df9d74b231117255c34457a94219248a3ffb26e5f56c1190000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "015223a2d54f92f21c93b85389c5713d8686a56daada32d69c6b5329f98e2889b21ce2bcd35307028d0ebdf755d44822f81682f00b175d"
        "c3f883afbbaa6fb7ee8738ee428b4ca66b9429a0344404b2b7ee2dfe5e8b5e02911b588e1da4f1c966eb061d6cb7fb94553d5119aed7ad"
        "256eacf50f7179fb619add182443ffc322a601",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_1024,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_028_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000c4f60d18cea8dd8e0635c77ced7180a2e876d85668a2f93eefc831bf5a7df549303737"
        "7c78ef3abb295a0a3c61c1ee95200c5422ff0e320596e5911f40951b587308182a1564c852a0dc8e4949e01a7a63459f1eac07d46c9728"
        "e865c68fb8cc8c94d087066e84169089f1bd1ca9279729dc2330182ee482eaeb9fbc4cc131e9da0ab86c161e7a019ea08b6b2899f8f76f"
        "8dcd27e65f7c92ccb0947d6834ed05242b08bd4faca3910119271bc3de7775c53acb92aad7c3d323372c4d149d140ac1f66172d6a932ee"
        "80bf123a4558c64a7ad25b912ac233aa599eda965e271ac065c68909634e18efeaa951c35b2424298633c3fe8783deba92e22be1dc662a"
        "e5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000010001454527fc068a9b491ce40321ebbc547a76f9"
        "7d427e907aca68b866ce9ebbd7ed829898da1d0a3e049f197caa19d383de4ca4295f1986db8eddb02566f166bf744f1894af10511ea6f8"
        "ce38f88b93d69c1e97d8cb87c345315fc4525fa102e102879abaf012120240915b027af93e809f0868d4b3507e057e09b30ebdc1dcdc79"
        "7d30d27f750c35e1ef66d1aae17a283aa29d7f0552d49fc8b2792cb4c3f8bb8fc437d334231213c2b0d671e63502a2c3b95cbd1b424c39"
        "1c17ac851268117c736d2dd28898c69c0c8467a5588b2c6e1d8bd21bcaacc524da0fafcee2d869aa0047a51c2c7624d4b9400c2b2109c0"
        "5b2b7d1a9141887cae78911e04a35adfd341",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_029_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c0000800100008001000080010000ee5f706a43d3f09582c6f0a7677e2f7695ffd50df34c0bdefe9710d3be0b08b6225f90"
        "f4b27bf4163cbfd0e088a85cbbab9d99ca499a7e33e46b7c8dbd49dc5c017c18409887ae7c67529ba4b76b534cfdf7a6b9f7dff7411e35"
        "958879e8c912229ac0a30d989aef962b97e8fe2c5029db5f51ab7deb6e4341063853d3318bc21f799d77b37302e976e2207f0672cb828a"
        "8b609a996dd519d54bf7dd051286b9e0b0447e789de7d724ebbdb61c5dd38b677af6470bf5dbff39ee5f7a6f811772ab9d38f1c42e371a"
        "6698948e505e3b096917c658aa5d0a48290f98cfd7219c324a6bcfcc66e244ed48013b52eb5a7bef7786f80089cb4b2f5ff1a8365464ad"
        "85f50e962c08d1cba6c7b2ba0dcb6af91cff35d5d834c224ee0adb6c4656ec575cdbce4fd60bc6d6d05597d70c92a2673e24f94f515e8d"
        "c8137e5efda4d5f8e51b42d6ce8186472bc92915da9995809b21d2f371c8d0840802af0afd43cd76cc914eb3a958f7c6bf05ba4705e2cc"
        "c8f85de9da4f5439da35a639fa326273f228a9000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000001000107e57b78d9b45ca4e74725d3b5d6f5458d64832f4a1efbc9b04f5acc58e04eb291e2ee8f5c"
        "964498b3fc7ab3e57306576530fc563a27f7044b0dd07b7588cbd6f469a2f808d57dcf3b30fe5cef828ba8e244e0ee0a2b0e2ac710695a"
        "b307261a06b16fae37161613d7baabf698ece8deea1877412213b97c5adc14e399fc6b2fcc11204945d58a84275f084a8cf12292b97a32"
        "820c9119dd1836c3083c51c7cac289b44b283dbadf62a6b88b1ed770d98e5d01698b18e2e7ca887dfb3554666d62a954f1e99fd0006b1e"
        "8b67eaecbdb0d3f918a880f0ce5cacc614dc81cc2029ead91ebec3afff48e704827e41316a55874950d0801f04b55177cec74c32f8fb87"
        "c4102d8a5a8a7440416d1664587ec80538c80c22ea0223163f44c9f3ddf3b504620246e26d58b17bca0714ebbf98d916cea6d88dcea325"
        "aaa7a22d184151b4285acee2ed6c064dfe0734e796298a8a5acb8a84462487be3b4629306f08fa2e507427d9bdf2a01b106fa832804861"
        "012515bbb4503485c38a5895dd5c41575d",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_030_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA256,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000bd242191c7b58734f519b77d69978689267e81ceae91c334890fb7e8391b9971947dc1"
        "a1919cf3e60cc783ef51c3702fa2592f4e0060a5a03f2d3737ce9f2f6813b6fa2244835c739d3b8065c52a0aef6924f648a4a7d65e49dc"
        "4d95c7265a48ea4ecc231af6b5a78acd94eb29d1a59c0c474510c8c74c087e89dbece00273baf31d2c915357e301d72ba33521537c3a19"
        "fef215b1416ed04cafe06c85c78abcc60553a6444f0bdef3bb58864d52a23d8447da98655632f8249d4602b1cb99f467c99d6429bba5d6"
        "cea31db9548178312db72d8cce5f8559b76b77efec3e19eba97eb984ac9232b9a84087335bdcbe2bd50d04e70ca0b99e0091b8a3b2818f"
        "905b9e894858db311cae379946941adb85b03ec13d53b5527ccbac90bf8052bb0ff33becdc1f2f493e4020ebbf1778dfae67942f8c08a5"
        "c069647de3532eecc3837d3b635c7ed8eadbb60adbfe52792b4de89ddf410a98dc59964dab256e20bc6558cdb7f7b7ae559057dd0f116b"
        "9250af84124a6d9d72ec69b2c756a1e711b6aa62a5a01140aca5e57aee6f738eb3093940cae3106711596b080619d34390c776804551e3"
        "315812b23a9e309f5f2a6a204516a4585721333b7db48ce6545325030a14f729c2a095bd98cccd21de27f84126c2e60ce261fa64879ef4"
        "dee4e40883d67b5f6389b3ae1e8c9018c96c2a62b5844bb6f556aa433d77a4fbe3d0261da1000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000184"
        "77e5bb0030373df3dbcb135efced10e990f8c114aaaa190555a8ec4ff2f0890802fbb679118010c32a8950f7e6f58fa718e774adf70289"
        "353629d24038652f737f57b8e05b5048f8fa4f76f79bf684af13601a8897b41fdd831a23a89347f0818a2696ffaf8292913862f0411dbf"
        "eb86fdf37549e9ab6ad7951e1eccd56ad0a8acea25ee45438c6a72f99fa073a431dd3b1db9eba774411734a6eddad4626acc15b6fc6023"
        "2ca13dfb1c891366a892852efdfe761ae51fbe25187f929e927906a7c24000aa97ffd6418ff3d927c4524d3e59fca01d6e7be366b55da8"
        "0be68392f65a607dacf731e891291fe35abb265fd4fa7607f6198a7bc39399b2cfe30775240fae0f0db1239e8b072a580f4d5ed2a9194e"
        "31c11bca7c6903e36e2224a9a9b1926dd500f1aa6cdbd2030ace1fcdcee9aedaefc477ad5bdaf88787d53cc83d2f00f25aa0f57afca753"
        "de2368c7f70245bd92ccef7a30b9f799a328f658d7a285265a3f03d10eeb7d4a4d42ee202ee2f54d182fe88d46608949f337b1b7a2691b"
        "0db4e8457ec437f921431cb40adc52163957bb2da94a4b7d6f80c38ba5d0febe3504826f279795ba72d358882d932e9bb85f5bee0d46b5"
        "e8e91bf2940ddd8ae7ef274f562eb4d47e380eae720f05293830313bfba820ffd71581a95cf50e4429ef9a020d43a09fa9a55fe1b2f6f2"
        "936d4168586db9160b14f3c8844d81f1",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_031_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_512,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_032_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000eadcc37762c4a0c4cd358de290f2efedf39503a1833e4082aef44cb564ff47d4feaee5"
        "f145b3711cd9abf944e0586bc083dd2c7dde4fc8f7d9a69d4fc5a8aef527c82d02fd30eb33a1791db30011733d60ef3110bd769f385f10"
        "b071ae552dbd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001158f2e62472ec593"
        "4b431f432d0b1ffb37e0f5f45d97d95425bb474f5f760fa1fdbf105c95896358c2a286bf4bd8d20b2d0b0880ff0193bcf0e625a9dbe330"
        "6ea4534c0d7e83b657684194501574a554f76cbe29ce5953e1d92b479b4d1f8201",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_768,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_033_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000da938b9dd72dd0646cf4a110789f7576da281c5bc54848edd5305d769798f1d50a9fd5"
        "9e0881824a564eccc9748932a52ad80832c1a5b3048fedcf2767cb7331e21a9e69472bde86d26f0955a4c80b4d0e64bab47404869656bf"
        "1d244f2f30daa7b1b80e8a17fa1527f54562a658a313f63b91a77e00504a001b0e2129db181d0000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "0120293392def57bc33b10e79e0fd18eac153f6fa4c52b74a7a205c2cacf558ec7c50f6d941a364c207a00903b582d53c95fbb77c15822"
        "f46b486e3a5bd6f6e594fcc0036be7b34bf6ef1897f8bdc9f5352dd9e47c83ca4a8e8670390cffee57bea3c3529f382d76ea7b8b91889f"
        "87eeabfe6c35dfb10257df39c31d3467dbd7a1",
    .hexData = "00112233445566778899aabbccdd",
    .keySize = HKS_RSA_KEY_SIZE_1024,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_034_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000b7e7b8fe8778adaac50fd7935451726c84b0f60dacbb9462140d50a39d065fce6bacaa"
        "d29bd9d6972e732304c30ee967676d8062c56e5ba6328e651a7afba7f0992806d08f575389683f412a63049c49200f42f9410651a946a5"
        "130f3cb10e6d8e04520af779b4d6d192578540efb66687a896cb3d0839692f4f1853697e9f8def35a94f6fb206b6375ad9e6c5e8c27eca"
        "4c25de185ded5793d0be50f882a124c4cf9774621872725e6365e6525a2d61d8558ed385c6a15b8b94b5548c42313c51229a3c3e5161a5"
        "d0c573808a30ec94f5ed907d250070b069a9ddf2ad666018a9f549dabdf8f333c6414c9acd3a3565770eaed7843cb775d22f7d790b97b8"
        "13000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000100018d1063a86985b9c0c9d3b30a419d0fe6098a"
        "2bd2a57265092e54604c800009b12e8a8da56b029745f3cd41493fcdca5f14c8bbb807b4f4fbf0bfa4f1c0f0140bcb8f165b17f8660d7a"
        "373ae72678bce0a284d25c9af21be57a58d8dbd13406db261a4e4c3733d5f10963f55a334b2c604d229638632251d74b00a2aa28bb85ea"
        "6e6fa3e9d4fb4e8b2a9f4aed3c2e84e488197383c457acb426babf2821b40a7a2b8c9a624964e8b223f20428e9d02ad13ecdc426858c17"
        "2070924068d97856b56ffaf5d47e643bcbc39d85fa425d93c99905301ff10fc15ec2c2bf49228b69cbb50895ecef1140cb05bbf314157e"
        "c8c21796b1eebea225357a4a8b89385eb141",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_035_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c0000800100008001000080010000ae9c2597d382b1cf800c1066c2f0fddd8e6e0d3d7f60b33066291cf20ea84f9d54803f"
        "e6829e80799989c4b95f92424237909b5a1cfe9f99890a98e4a80548523276c4cd421dc8220c673d21255c29daa8862551ab5c6c19684c"
        "8ab11ed43bae6da8184a0a97791f7b3d7b5cd33f7cbd6b2b4847f6a8bc3764faa7593763f5a3fc253e616e73fe26eb08aa3060d40be98e"
        "f95c39ba7d8ef3528760b8c5c9c8b7a7f74f87498e3c33a76d4c94863fa9a3d7aa88019eee6a35ccc43d7dad5f8a0fef2cdba741f900cd"
        "53e8155c4a90f4f79c7892d445e7da3d6a2496a4ca32ec8fa325bad6ab0bfc4911bce78be03ed0043f7c5fee60d4b10c7412301c6dfd36"
        "8093b9ab12dfc61d403b7905ec78327b384c94f31059021b6cdefcf8440e1ca74ba5eb98d27c158825a8b7a648c8d0a23c28d15eec8924"
        "058ea9d08fcdbc99f2bbe017228012861df4fdadfc20f58600b2240c7a0048ebb2ea2d8f846a97057c6fdc5b1cf916095fd51659063400"
        "9bd94a988ffcd2007ddd46aad6918bbd3bcbd9000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000100014cbc00655da56500fc93d0ad6864421c98d8526741503ccf3b463c1b4047c55d2de282b289"
        "9aa0794ff95483e6b53efb1cb227238df4742d24258d1587a572a7f4d76f1b893fcf50ef447b7fd28c53346db52e375ae86df52879e2c5"
        "7df7e5167dc84e8c536547ec86db79184d19ec76cddf228fc59d57c1bc55cf2f8d0117d56e1cebf22379442ad445658d873008e0265dfd"
        "a2bd0b2ac451f37e95150edd6fa09835d20d883d7ab1cc7dc813cb6c80bd698b05b353b1475d6aac5f4bceddbbf3040f17f701e60a945c"
        "cc12e90354b6c508084570a3058dde4e0253e961c014547a2ce41c5b9ba04704329595cfc1b451736658cd3e6734e30864f1a083801c14"
        "fd309c4e116329c5f0d6c12012126267dff44a47d4d6fd2f6e8a4c0c50e14bcd3cd856ba26894451513e139baadf3a2f992f22532afb8c"
        "c7607413b7d42230c8c06299b46117706658653f838d32a8de41d8ed7ea779ed1a94029cfbb3f4527bceb5ceb700fa20bb5e5f463e17c3"
        "10ce7fe7cef8179d5cf7924697551d7301",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_036_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA384,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000a92637cd544520cdb67f0aee8c620047937df05133af415e2644873f2a04a8b5d1ed19"
        "667e0aa5b0a859c0f881f872067e208c98ce775de153ce95593659e3e4133229749293f83af9d5b6d15b35f0582a3b20bb7d243c5b161f"
        "a1326ad5402b1bd1f0e7da929ed5601e5abbadee4243ed6bd364aee814788a6204efc2e6a4b1172f79215c02c49ab1c3e2f9c9cd03e35e"
        "27acb023fd724095b0b68ef069a746067516093168f84d6040c64d448680bd01f5af31e78a57b0f6e36d4274f54244d5df0304c3fc9d32"
        "083771cf322dd31a4e02b9a55caf68bc919848cc126802e5883e015f6dc48f9de821b1c83142b674a374fd7d0cb37483824ea9efe0151d"
        "eab15e6ea8f54262b80b6036f6151c82ee6804d003269163ab52bc62ef6b8e1649975bfae50bb8b22cf4f1cd518c9e11aecca3905bb1d4"
        "866fab531ba1531748e8722a7d12d3ee52014ad6919f10feccaa1bc3386b951bfb8587c7694cadb9d3be984a706d40505bf7dfe1963efb"
        "52fd1ac8e612a42ed934b7e0f132b9118ae13361f914b27a5ff1a7b0f0c27788d737410247c2e25124c982926972b87f35e1e2a4529235"
        "04474dd8981ad18b0424ff40754a271652bfb35acffcd25c46afd5a69ab1365e7259b05f04b12bebc7ec1361e909359deec133c7c4b58f"
        "bfb2b8fefa21df15955e31b688bcdfb1e857d955af09e5b724b9a11dbb3cc7f1418f09995d000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000104"
        "63e68ce0c40e8ee84eb1d4f135d5f605a0fe2ccd5f9e1db8768ce019d21722e8f8f370d292aa2c44a257bcdb7abc52e8d125750dded143"
        "f8ede2b8770dac398e39fe13757e7bb1e42c24db9837752e84a2163e67881a3ceefd112d02d2d820864f53a660e8ef5070773939a7d108"
        "4d450b48685395d87a2c7550d57c448a3fc26f4c008ea7cfbc8822a27083495bf179cf23cf4a8fd8784eaa5082b340bac3b9852e763c9f"
        "11dac845c61fd948786cef711604009379a5313343f1b6a16affe8612a6de43c5944242c743ac17da8fe04ca5351346fa51347e020fb92"
        "faba208501befd6016faf749401ea2288d27b92d48eb0f64d5ff8f2e41a66d806e6be151b4f2c409e0b8035ea2d63e9baf538a122e5e5b"
        "02c41f11c218cb4e86665c11efd861a325a03fce577de17928da5a2fdb0786de366758c7d89514c3136da75a7095565e9bfdbe3932606d"
        "dc43d631025828cb95703d1a7907c181126af324f5801531535bac8a6714204e46ea683d287c4c52f92f0f73715a5b8311d136aedb9a69"
        "608e18be69e85a8c12b486bcf72f9a3c1f1dc01b5c77defa6b66999eabc14337d39183fa82bbd9de7f12ece728cc3b523e342c21363e52"
        "4c8ba57b32835e06b8695022991d123afcaa7c6bee5802616b8ba5507e1276c0f472feedb3fd0a5c3f4bd2adc986c78d079d210537be05"
        "a47eca98a7546b10c94e5f12a81b0921",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_037_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_512,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_038_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000eadcc37762c4a0c4cd358de290f2efedf39503a1833e4082aef44cb564ff47d4feaee5"
        "f145b3711cd9abf944e0586bc083dd2c7dde4fc8f7d9a69d4fc5a8aef527c82d02fd30eb33a1791db30011733d60ef3110bd769f385f10"
        "b071ae552dbd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001158f2e62472ec593"
        "4b431f432d0b1ffb37e0f5f45d97d95425bb474f5f760fa1fdbf105c95896358c2a286bf4bd8d20b2d0b0880ff0193bcf0e625a9dbe330"
        "6ea4534c0d7e83b657684194501574a554f76cbe29ce5953e1d92b479b4d1f8201",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_768,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_039_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000d10cdba0a029d15254e1b98a1ab3fe28387017976d817ed229a88e521037451768a681"
        "bd6b8944d1efc6be41913da3dc8cf42cae0d0b449e2cec4df0537b1702cd9a79b8394175c0474e96fdc7d26616c268059c4d01bb6ffa70"
        "c12fa591e40093d988fe0c1d76df2d5999827cb12e7b287d537d477a7a8dae6ce9e6a1c2577d0000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "010b443221f9ffc6f434f6e554f81373431fa78addf25ce444d751ea39a9fe108f2e68aadd568a53572d20fce7f3b7eab8dc2fdca894b3"
        "62c3539078b2d70cef3472861416697b8908bd3c7263a6873b3baada43817202bb5b90e417af0e3ba8c1fefa011592604c2c9066e12265"
        "5b83ef84097f2112e64d11193da5dfcfbf9a51",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_1024,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_CRYPTO_ENGINE_ERROR,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_040_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000c594f464bc7852f61e96a56ffab6d1ee5cc5552e51ce5426b17b8fb50cefadecb0ef2e"
        "9402906b9460f2dc527188a346e964acdc3357c2dcc56be8247243350cd9dc122dac3f37f4d22870e9b6d5524d43fadf5cb3a5386ebc11"
        "4fc830faa624155526fc893bf7848451827c68c3610932a7a97a55c371340b86b4ba1aeacdc0185a7ac78511947bec87bbbfe011baa45b"
        "19d7f7eb0accc77502f26ebb0d4797b3cf1a32116f9cd9f0ad4977d2881cb61d0439099c77e3e59aeb4386ca545cf534453c55d7b548e3"
        "de6cc513374cbe312eb6564d476859307dd47498df59dfeaade0a8339754fb3a192cd64bad563c861b505d05b54a6254903ebfdfc6beb7"
        "79000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000010001691598061bd7430873ac5bc0faef51281d5f"
        "36b6b3fbb0f6035f5c4746e212f6d803de1a0a6315548d5b9da29b8fb887768a7d0580a9249296cd95620d0381ab9c1357f7c2acbcee10"
        "f841558c5058bd8f725669cf8208499cecf829d922f64a2aae6755d90773d59f2a5ae4203409e00278f9c27eeabbc29a7ec29058d0992c"
        "a911b57a2af8a582caaa3add2aec200127e95e9032a8a4c546fab425148dc2c72ff487ad05bf0dcd278024e74d0e010f5aab57eaa5dc8d"
        "ffc4e049cc6e2b34d50db7e73f0f4c78e887a0b59f2ce34117ed605379c0b28a096c2c38282af0048df55dbf771cc57e327e8008e86723"
        "adf95c1f761b56c8ddf2e78e532861cef681",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_041_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c000080010000800100008001000098d7dc7ba96338aa0f01393fe4c848f9491c9e6851e8869eac27736dfffc30347c7723"
        "457f79082f61a2188ebbcd1906137e7369f5e6fa5220062938465456a46367e9551c1dea7f616343f2bd6078a89b24d10b7bc08fda6d95"
        "fb9414bdc869e3449abf06b314149bd5a6f0dbbb195476ca4ee29ec65405a0b8f1225b890d6e7ee2cc39c1551f7a1fa42981bb98cf5939"
        "83c5985bbb13eb545d57c46e9d60a05b50d0bc3518606ba5735c00607068556bcfd788926f0660fbe386777befc53dbec3a26c61405dc5"
        "92da9c8aea3b87299e0c186eeaeabfce7c4f0a67fe952411fe62cf6007a1c28eb7e91316d72e054857136b8b75b74eefae1278adeb5c60"
        "ef79f5ff9197d67cc0ca8564bb6110bf5e1e2fa915b05fd9d6bfc74b1fed176167638c3af06f5b016b5aa368297952830870de51040160"
        "33535b0948b6b8c548db76cd13dfc20742e194ffbcea4c491f884e4d598987b0ef86a11b771b8e244a9677ee29ac104588f45f90c9b0b8"
        "2145ee35c324e6ef9007fa424743d00e3cdc39000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000100014ab39e1876967f1866d303471e2b61b72d2ba6a477fbfce7ca5e51c55e8ac488b2988c0da8"
        "9ae00c405cb841f2b9f0540eed0bbdab28e409858b5d541ad397b12ac09bc33445ced9c9207a1246cac2ce2d5d962a55a6ace8660d1af3"
        "aa1b83bb750f8fce7398cce4b1b17fb152c3a442aaf8800bb4ec5c1e900a3418c5c23b6558f0c23e2c26cd86a3b6596f05e04edf5e03f0"
        "6c61d112903f208c07fec43e78c188c32c698aeb7d51550b8f479348fb0f017b674da2a3ec7cd01c65839691c0b58139e1b3d827c3961a"
        "26d9d64fc676955e4b09ab58d4cbcdd15d34cb6da228a9b709dc87cb6a0f6826303e082aa16c27837fd62b42682313e3e9dcff90b06aa5"
        "318704f4260c03c41ef580a70a2fe4cad7ea2a4f4793173e0c49d7995a04bb97d8bf77fb14b0efb9c61ae334612587d76c92f7ddd2ed78"
        "a86830cfb4715a02908a6bc917d8b262349d19427c58b0d26be9dd105e819a422b738bd86a0f69f41d668fb6d33de4fb784af5e42d3168"
        "ff5fba845faf39d5e65cc388bafb6af671",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_042_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_SHA512,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000b84a40ff88dc4d56d93df76a10bbcc0e6ea27a3256cfbbb2b6f87bb9735752e7a51893"
        "5d1e8d40777736854204be4a273e76378653178e5201a82ea19e46b59634a424fc6968eaecb76dbe53164a8ef6b822193ec6dd6a7d98c9"
        "ea5dd3aae031c854347c5a883b18baf6541b330ed09947adc4ce8974c9534bf572d4b73160491add3d312afbd2a249685c00b995262349"
        "dd6ea374b91403be3b008338b7e9fee6f14dff5bbb57b1414a1b912858bdda0cffb2dc0f1a543882ad0b08a95aabb7f4174ea9fa487e1d"
        "ac6bd3a531d5ecacae1252e0b0e8ea40d0aa9c691db86df1dfc2c01afaf41ac7e624e6384d0d4bb603f8b19eccf80de9125b868ced158f"
        "56712b3b5ffbb5d981e1eca28bc6ac81f1a04afc41032a8891fc5d3d25b86511f6d80137512b9d5e04521e3eacbd60c5047cd7c9d009ab"
        "4fd4657b41f28a8f0cb51c73fd89a6eeff0c031c273750c147f12806766791c9cd4beefd71765ce74f5fdf0689ae2ef04fe34931078484"
        "04ae44c01f5ddfdc2166ba9037862e132f01274800760879cb23fa4395ae0e9c5380d925d3fcde1782b754f197bdea13eebeed3846eb33"
        "5145bd67baf2c10f6379c0321f2abab2e33661c153f4c08eb3eab0897372f43b4cd4dbd4d9dd9487705f4a7cdff310b3c7df5d7d144061"
        "40b8a915f569bcdd83b87e8c7638d80d46421b41d8507e4e76ae6ad307fb90fe58cc62d0bf000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000121"
        "a31bfe0842fdb2ce702b0aa70740159a47f9b9da728c35f083a6419135ed21eed66f7f5da6369017a851e65ceb46a9a712f8cb81bb18f5"
        "0aec61a68a3729c9c2cdfb1a3f3b313607bcf632402d57aedca90ca692b1b3503d650d6c16c867a76e8340193a8507145a7bbf9a3f5582"
        "e99755b648647a768cc79e8359241ed50e42e302da4898323800e21578e466bed14e1826ab9b107500c1e60f0fe4785d33737fb3d6da2d"
        "75b21ad2a5f976bdcbd952ea11016d9846ab11def7d69ae2bbd915aa73673f11a0435647501824e281127bab48894e8114d0c3c5804b07"
        "6bb455a39bee687e49b3e1acb62b77374927fa8efb03a09294ec25107eb82e5ccfc49b98a4c5492c45723b2054454726771e555c105994"
        "5d3c1ee5b03bc514d44da961420f4c82b5e6fcdd8849b2395bc9fa1487c0a7381ce651806eb384e90445a8d9e08680d518673bbccc096c"
        "9eb232fed9d5eecc7edb09e09ed63884c666c8b9ff65b11fcccae817b993830b4766713250c175fd6d5ed5d18a8c6555583c9665a9e701"
        "f0a55725824478bf3a3ec794fa2992afa2cce454c2c9a861afd9cd83dbb66e55aff4e4d5728a2b22a319b39c4df3a3cdeb8d71062d0215"
        "12608805239e96d25562445fc30b894890dedc92c8d456029a2d382077956a0f4335c95b06758f2e245725b37c95da5ac1ec3ff4a70ae0"
        "3f069a7a11e27ad124aefabc32947761",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,

    .encryptResult = HKS_SUCCESS,
    .encryptInitResult = HKS_SUCCESS,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_SUCCESS,
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_043_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000020000400000004000000040000000b9d0e8e1e1e33cd6eaf71c9a4fb26045d651ac7b7a32984b5ca5bafd6d34d6928256de"
        "c0e3ffdf2712185b50c5939077eb460da307125470b52bbcb0a58455eb0000000000000000000000000000000000000000000000000000"
        "000000000000000000000000000000000000000000000000000000000000000000000001000155e461a1f85ea802d87dfdb4bede3f6e48"
        "d15c1f7faedf8306827d5b241de688ec7fef8839a217a03360771ae67ff5183fce0ad19b9c15232db782d9b9a607d1",
    .hexData = "001122334455",
    .keySize = HKS_RSA_KEY_SIZE_512,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_044_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000030000600000006000000060000000e010a0d37f6fc663a131cde4c27f458e46f9448c4ae99927d682a370a71ff936859b6f"
        "50bab014de3c0fbdeb91aa01969be2b2ba1d11e60797e4b0bb9c1ffd09a56506e923f186b7aa593761bfe2d2fc7a09e6050dbe9bdf875d"
        "684be2a76cc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001bcb1642f1897f1f3"
        "bf31291a682d344f5037e5615c490320c88675cb8e02e025e9386ff30574f9edf998ac313117818357810e80c32a6a122cf1d9163ba9d8"
        "7e38f7291d3ecc39c5d13e94406de947c860de27ab10e90bccf42f76164ec03381",
    .hexData = "00112233445566778899aabbccdd",
    .keySize = HKS_RSA_KEY_SIZE_768,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_045_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000040000800000008000000080000000b4a4455910bcb2b65c2937ea25ae2bc5dff6df61644292c330c5985038fe6b3c485af0"
        "7d963b10820242784a7c24d4c46038ae46f17ac854188cbc894982e9c00fac378dea8d6c6297e759362b3948b828d38e735daadf08acdc"
        "dc0954eb32725084d74970cf6cb5c571cb16929adb414052fbe2d93cacc9e03d9e139685abe50000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100"
        "014107018fd65e9756de46584289ddf1140253b48632b9646baf9af201af02a747c424387e7d1e360b1715268869b8387f98c3ceb8eb24"
        "f00895edd3d0f80d906760026ece80380d1b2719dd7cf6110fa8949bf22067f8f7d4072d355cb06b20271e25aba9b00730b3f1a549822d"
        "a6628ca7118bb4d3d05bd1432fd072604cea01",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_1024,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_046_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000080000000100000001000000010000c9354edd8b70a5f187bd3576b08cd52ef54468d027d061e45dca25e0526cc89b4bcbbe"
        "1f70ee581a2834c9123b08cc28cfef131d7f8ae5ec5f22dd282cfafe922121da0bf578826a09c13cb5bb6500881a5f245d07ce87ccb670"
        "0b5d91cab6d1d591b43558d62da7257c7d63accb6c1f804cc8772370d67d32c99911e33d0b62d186f068ec655c63759944fa8500722835"
        "a5ffa35c0199ecac1a304a5ad5eb73cfe031711a3a4928157f9a9494a5c3f3b536be7d11763dd5af26e0ae3cb420d3fa3b6f587cf79faf"
        "8ff31bf90304c554d1ab4b2db23a4f0c85a2cc793dc31c31ee21b436093900db2b6636e11bdb0f0fe9fff003d3a4486458027c13098eaf"
        "99000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000010001100f583728bd1a11b842eaf4894d046b161a"
        "9abf1a9e7061d8f69ca5560ee6c8367991b852bc437dfafd939b07e940da7516611136aff080386bc0f946f5d5c1f6310c856dd76b9969"
        "23ea639b0c89c953498ace7e240704d8ff02793a7cd2b0d6fa254728cb17a3c2c33802efb4e0f176bd2a3710361e78a9c81b96a8eba36f"
        "e0821a44f82e88e0028ce3aae7f17b295b53fba3b600a358a8321cf80274da7eec5778a2f11e6ec3fd2b110918e15c3a5da5832ef7651c"
        "41a160d15679f4ea3bff56bd505f153e013e26a1475370606ddd05e36b76d7cde176eb62af1a48aae3237b86acb0a8c0ceee45a6ca1318"
        "6b712e72116fb303775a0a4d8365bf4e35f1",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_2048,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_047_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "01000000000c0000800100008001000080010000c0d7a1b9eae690d22741b0bad5e6abdb786a201cbb01154f1364fd8b5fc23a09621bca"
        "d8b997b32ad0120ee18c662a478313c3a5926151575944241e8ee464fa2fe60c79a324cbfef988275afb009c4aa05935da7a265cc415f7"
        "212c9a6a92e2e6d75d621742ef8a2ca468aa5481560b8cd6d346b17f1960cafd2b815949f006613e9b0690c61b5ab83cb3ed746cda04e7"
        "565f58a888136a631914c28f9f90851ae1653a9f1f2a60215833110e91ee6c226b97ae5d4ff104eecced33ffd916caa2a84877f58db389"
        "3f8e846ee288a751863d867f80e7fc492f1d6da9aa0c60dc1774b343a899d2ea6688b81be72c12c3a79698ccb488c8a96342aa8ade6d15"
        "46285d8e5fb35c41910584e9732c2756c40798f413331215814d283f6b7f67f3424f11d5da5cc4b63e163b23f9970c03bc24b924422536"
        "021532590a5dbce0a0cff8e7052db4529e7b0205995d1bce29ab4f5ed9840985a57fd60144464c28f22a9bcc8f21b009a69b35f65f0343"
        "5dd584b123167d6767226150656ac3c38917ab000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000001000187655eb9a881e5e0878b89c84472c6eb3b2a580d9406f8ad2292dfa9c1bc1eff8390bbe55a"
        "b97624731e9ab025e17d81e438363fc3fcec1d86215fb2cce4f338edf47981d5d7fa1ab59cb0f5221295a997d7cb05f0898acc6a17af85"
        "1f8e003fab903e92a67e6aacfb171c1dab637bc4744848e2f3b0a762dc62d0eeea800d348d86655640c3b76504c22a1a688a1cb120b3f6"
        "11cb926eff5d40b8e0b9f27087e40da90375c16e013ca82e82a55634ae5ba46b4513631378412a44c923b38a59d5af20f66690f0d34813"
        "ebafdae3968685390b9db7e8482573df5804b6191e0b32c85644f998de27cd58d6b0151a2645d5d309262c63f033000510528f4efeaa8f"
        "ba78a85ba2b95d6ae78c2b29c26f0eb2485aacf275b0e7bd0cdf9992b3debcbabd3a7d74e9b50bc8d45223b668d61ff092276679de789b"
        "397501599da8e34cdffc40f771929eaf49579d29a3f6bd03b27490aa195d4273ca3248af236ede466badaf076af2960585d997678417b6"
        "d00c49460d173a5e5014712099829385d1",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_3072,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};

const TestCaseParams HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_048_PARAMS = {
    .usageSpec = {
        .algType = HKS_ALG_RSA,
        .mode = HKS_MODE_ECB,
        .padding = HKS_PADDING_OAEP,
        .digest = HKS_DIGEST_NONE,
        .purpose = HKS_KEY_PURPOSE_ENCRYPT | HKS_KEY_PURPOSE_DECRYPT,
        .algParam = nullptr,
    },
    .keyData =
        "0100000000100000000200000002000000020000cd7af64a4ce004dbfadb758f6d6c5fbc9640e00bc40e8ba08292c2a4c8b3b22d08c547"
        "3eaa5083b4dd45bda9c5ce2c86789a7c2db787da6a3ae56736c18d025b6ef1b3a483cc25448de67956b94c390c03f44231939d9dff4985"
        "e707dac520b00dcf18b6ae18e16c64f2f169945be2f98df16098e3e8ef3491cf310975a8e1a1e5ed96fc132d7e17ce84b9f4e6c2d842b0"
        "739f515f0fe0d8c76ce7da95e4db26e048c3d7b911ef6489d66837f2f9fd8d1812a8417f611cdfd44c2bc5fa4f1f92a2eaee6a08d53189"
        "91ad7d1d8e146210308bf456862fb691045443da3e2a92cc611ddb7a08f3f40803cfa3e6cf9abf8188fde526d5fc9c664f424dd5b17366"
        "143718f2f6efffcbf42f495d1992db9728c38e993b43d4f191e48374b6c4e7116ecaaf63b5016207fa48407df7394b14a3744ab4a825d5"
        "b9dede3e4d1271b2ffc2be70594f689a4695ca97609a3341bfb12e8386ad8deb5d9c95c6fad3f5448390ef5db2cd52a4d709276d6516f3"
        "33611e9136d1f2de02927aa404f7c4d755dfe37d44ea9c8eb0a911ce25a7ae4fdd5dd38d1610295692f6ab7d7099913044ff7e348d25cc"
        "cbe0e0e34e6fe5f4d1984b4070be9e5e855f58477fa49bf804f6b6136dfa60a8a318d11e031fddff42ec0b9f5243ab5bc3e771a17e3a5a"
        "648f7d618d108a4b12d4bee7ae6a2ee43f9226e6878a3dd33ec2d3b981b0d22c7b1ea123f9000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100014b"
        "4117668ad518b2802353e0dd906d57a227cc6642bd99018610bddc9fecbffaa255ae0c13503d8c45e5bedaa8a923c173f61038a618c933"
        "52b2a5a4762a708c900b5161952b7512b06d924ee2ba39c25ec85c5dcfd450032928333ebb2eab140f5aa390741e84a0b030119e3b4993"
        "cd15e12b219386c1e49cea26e9720011f2bb44d2a12b5ce3eb502567fd7b6e2cc9efd9c8a5828d4c29d88fd83243e77723bbccaa7d1d38"
        "a65649ed0e6a3f40b34db35d51e5fb02d4125dac2ff3e802866babe322c20ece15c06e6bfd808f82838fae57f37aa4d660a4a7d33cae77"
        "4a1c4d61dc0f7f983bd04a072b4ab9c39ac73c67b1a4f51e35d009e049463c572b0e5cfcac332a782608d39c7bd4c3be513aefa9bba8c2"
        "2df88c40b3635d3e9dbbeaa4ced0e7f53a1599f8b9f3a164e7aa4954141bec6bd0a5052fccffab1ab53c941f9d04bab5eee41eeda05152"
        "aad1ac2c39f8d1ad9fe3804dba684c981776ae1c9fc2dad2549708d158cf6350f0c4da940c69610decbfda5398580ea491424aabbd0f62"
        "d14646fddd5509005d3474a506d6b919e133596422f60190b10b807b7992d57ae5dca530e30a064553e5cc22a8b98616b56425716eaac6"
        "bd700a3e127011894493a86c2c483c04e6f22efb4049015cebd96bcaa36303b41cc7eabdd205efd99c1841c7f1cf6fddd27c167cadebba"
        "d8989837da29f0e5c7f1047c222f79c9",
    .hexData = "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
    .keySize = HKS_RSA_KEY_SIZE_4096,
#if defined(_USE_OPENSSL_)
    .encryptResult = HKS_FAILURE,
    .encryptInitResult = HKS_FAILURE,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_FAILURE,
#endif
#if defined(_USE_MBEDTLS_)
    .encryptResult = HKS_ERROR_INVALID_DIGEST,
    .encryptInitResult = HKS_ERROR_INVALID_DIGEST,
    .encryptUpdateResult = HKS_SUCCESS,
    .encryptFinalResult = HKS_ERROR_INVALID_DIGEST,
#endif
};
}  // namespace

class HksCryptoHalRsaOaepEncrypt : public HksCryptoHalCommon, public testing::Test {
public:
    static void SetUpTestCase(void);
    static void TearDownTestCase(void);
    void SetUp();
    void TearDown();
protected:
    void RunTestCase(const TestCaseParams &testCaseParams)
    {
        uint32_t keyLen = testCaseParams.keyData.length() / HKS_COUNT_OF_HALF;
        HksBlob key = { .size = keyLen, .data = (uint8_t *)HksMalloc(keyLen) };
        for (uint32_t ii = 0; ii < keyLen; ii++) {
            key.data[ii] = ReadHex((const uint8_t *)&testCaseParams.keyData[2 * ii]);
        }

        uint32_t inLen = testCaseParams.hexData.length() / HKS_COUNT_OF_HALF;
        uint32_t outLen = HKS_KEY_BYTES(testCaseParams.keySize);

        HksBlob message = { .size = inLen, .data = (uint8_t *)HksMalloc(inLen) };
        for (uint32_t ii = 0; ii < inLen; ii++) {
            message.data[ii] = ReadHex((const uint8_t *)&testCaseParams.hexData[HKS_COUNT_OF_HALF * ii]);
        }

        HksBlob cipherText = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen + HKS_PADDING_SUPPLENMENT) };
        HksBlob tagAead = { .size = 0, .data = nullptr };

        if (testCaseParams.runStage == HksStageType::HKS_STAGE_THREE) {
            void* context = (void *)HksMalloc(HKS_CONTEXT_DATA_MAX);
            EXPECT_EQ(HksCryptoHalEncryptInit(&key, &testCaseParams.usageSpec, &context),
                testCaseParams.encryptInitResult);
            uint32_t point = 0;
            if (inLen > HKS_UPDATE_DATA_MAX) {
                HksBlob messageUpdate = {
                    .size = HKS_UPDATE_DATA_MAX,
                    .data = (uint8_t *)HksMalloc(HKS_UPDATE_DATA_MAX)
                };
                HksBlob out = { .size = HKS_UPDATE_DATA_MAX, .data = (uint8_t *)HksMalloc(inLen) };
                while (point < inLen - HKS_UPDATE_DATA_MAX) {
                    memcpy_s(messageUpdate.data, messageUpdate.size, &message.data[point], HKS_UPDATE_DATA_MAX);
                    EXPECT_EQ(HksCryptoHalEncryptUpdate(&messageUpdate, context, &out,
                        testCaseParams.usageSpec.algType), testCaseParams.encryptFinalResult);
                    point = point + HKS_UPDATE_DATA_MAX;
                }

                HksFree(out.data);
                HksFree(messageUpdate.data);
            }

            uint32_t lastLen = inLen - point;
            HksBlob messageLast = { .size = lastLen, .data = (uint8_t *)HksMalloc(lastLen) };
            (void)memcpy_s(messageLast.data, lastLen, &message.data[point], lastLen);
            EXPECT_EQ(HksCryptoHalEncryptFinal(&messageLast, &context, &cipherText, &tagAead,
                testCaseParams.usageSpec.algType), testCaseParams.encryptFinalResult);
        } else {
            EXPECT_EQ(HksCryptoHalEncrypt(&key, &testCaseParams.usageSpec, &message, &cipherText,
                &tagAead), testCaseParams.encryptResult);
        }

        HksFree(key.data);
        HksFree(message.data);
        HksFree(cipherText.data);
    }
};

void HksCryptoHalRsaOaepEncrypt::SetUpTestCase(void)
{
}

void HksCryptoHalRsaOaepEncrypt::TearDownTestCase(void)
{
}

void HksCryptoHalRsaOaepEncrypt::SetUp()
{
    EXPECT_EQ(HksCryptoAbilityInit(), 0);
}

void HksCryptoHalRsaOaepEncrypt::TearDown()
{
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_013
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_013
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_013, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_013_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_014
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_014
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_014, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_014_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_015
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_015
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_015, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_015_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_016
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_016
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_016, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_016_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_017
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_017
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_017, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_017_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_018
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_018
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP_SHA1 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_018, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_018_PARAMS);
}
#endif

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_019
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_019
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_019, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_019_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_020
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_020
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_020, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_020_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_021
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_021
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_021, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_021_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_022
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_022
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_022, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_022_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_023
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_023
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_023, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_023_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_024
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_024
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP_SHA224 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_024, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_024_PARAMS);
}
#endif

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_025
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_025
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP_SHA256 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_025, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_025_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_026
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_026
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP_SHA256 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_026, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_026_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_027
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_027
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP_SHA256 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_027, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_027_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_028
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_028
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP_SHA256 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_028, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_028_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_029
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_029
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP_SHA256 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_029, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_029_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_030
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_030
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP_SHA256 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_030, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_030_PARAMS);
}
#endif

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_031
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_031
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP_SHA384 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_031, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_031_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_032
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_032
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP_SHA384 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_032, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_032_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_033
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_033
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP_SHA384 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_033, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_033_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_034
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_034
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP_SHA384 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_034, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_034_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_035
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_035
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP_SHA384 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_035, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_035_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_036
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_036
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP_SHA384 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_036, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_036_PARAMS);
}
#endif

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_037
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_037
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP_SHA512 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_037, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_037_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_038
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_038
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP_SHA512 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_038, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_038_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_039
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_039
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP_SHA512 key failed:keysize<sha*2+2.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_039, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_039_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_040
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_040
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP_SHA512 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_040, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_040_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_041
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_041
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP_SHA512 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_041, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_041_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_042
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_042
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP_SHA512 key.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_042, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_042_PARAMS);
}
#endif

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_043
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_043
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-512-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_043, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_043_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_044
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_044
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-768-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_044, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_044_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_045
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_045
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-1024-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_045, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_045_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_046
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_046
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-2048-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_046, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_046_PARAMS);
}

#ifndef CUT_RSA_4096_TEST
/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_047
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_047
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-3072-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_047, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_047_PARAMS);
}

/**
 * @tc.number    : HksCryptoHalRsaOaepEncrypt_048
 * @tc.name      : HksCryptoHalRsaOaepEncrypt_048
 * @tc.desc      : Using HksCryptoHalEncrypt Encrypt RSA-4096-OAEP key failed: wrong digest.
 */
HWTEST_F(HksCryptoHalRsaOaepEncrypt, HksCryptoHalRsaOaepEncrypt_048, Function | SmallTest | Level1)
{
    RunTestCase(HKS_CRYPTO_HAL_RSA_OAEP_ENCRYPT_048_PARAMS);
}
#endif
}  // namespace UnitTest
}  // namespace Huks
}  // namespace Security
}  // namespace OHOS